#include<stdio.h>
#include<stdlib.h>
int main(){
    FILE* file = fopen("hello2.txt","w");
    if(!file){
        return -1;
    }

    int offset = ftell(file);
    printf("写入文件之前: offset %d\n", offset);

    for(int i = 65; i < 65+26; i++){
        fputc(i, file);
        printf("写入字符%c之后，offset变为%ld\n", i, ftell(file));
    }

    fclose(file);
    return 0;
}